﻿<%@ Page Language="C#" Inherits="System.Web.Mvc.ViewPage<OAclient.Models.ConfigModel>" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>配置</title>

    <script type="text/javascript">
        $(function() {
            var provider = $("#curr_provider").val();
            var readed = $("#curr_readed").val();
            var lastday = $("#curr_lastday").val();

            $("#EmailProvider").find("option[value='" + provider + "']").attr("selected", true);
            $("#EmailReaded").find("option[value='" + readed + "']").attr("selected", true);
            $("#EmailLastDay").find("option[value='" + lastday + "']").attr("selected", true);

        });
    </script>

    <script type="text/javascript">
        $(function() {
            var updateconfigoptions = {
                url: "/Home/UpdateConfig",
                type: "POST",
                success: function(data) {
                    $("#workarea-14-1").html(data);
                }
            };

            $("#frmupdateconfig").ajaxForm(updateconfigoptions);
        })
    </script>

</head>
<body>
    <%using (Html.BeginForm("UpdateConfig", "Home", FormMethod.Post, new { id = "frmupdateconfig" }))
      { %>
    <p>
        邮箱供应商:<%=Html.DropDownList(OAclient.Common.ComVariable.ProviderName, Model.EmailProvider)%>
        <%=Html.Hidden("curr_provider", Model.curr_Provider)%></p>
    <p>
        只接受未读消息:<%=Html.DropDownList(OAclient.Common.ComVariable.ReadedName, Model.EmailReaded)%>
        <%=Html.Hidden("curr_readed", Model.curr_Readed)%></p>
    <p>
        接收邮件时间:<%=Html.DropDownList(OAclient.Common.ComVariable.LastDayName, Model.EmailLastDay)%>
        <%=Html.Hidden("curr_lastday", Model.curr_Lastday)%></p>
    <input type="submit" value='保存' name='submit' />
    <%} %>
</body>
</html>
